#pragma once
#include "base/timeevery.h"
#include "util/noncopyable.h"
#include <map>
#include <string>
namespace net_tools
{
  class Eventloop;
  namespace base
  {
    class Timeeverymap : util::noncopyable
    {
    public:
      Timeeverymap();
      ~Timeeverymap();
      // 线程安全
      Timeevery *Add_timejob(const std::string job_name, Timeevery *timeevery);
      // 需要在io线程
      bool Del_timejob(const std::string job_name);
      // 需要在io线程
      void Del_all_timejob();

    private:
      std::map<std::string, Timeevery *> timeeverymap_;
    };

  } // namespace base
} // namespace net_tools